package create;

import objects.CarBase;

import java.util.ArrayList;
import java.util.List;

/**
 * @author whn
 */
public class CreateCar {
    /**
     * TODO: 这里要写一个新的创建车辆的方法块，1、创建一个路段模型，首先确定起点和终点，起点重点的车以全0设置;
     *  2、以100米为界，每100米采用泊松分布定义车辆数量;
     *  3、在确定车辆数后，每个锚点以车辆数计算密度，保证全部分布在锚点前后50米;
     *  4、重新定义模糊逻辑，使之可以计算并且和位置相关；
     *  5、车辆到达终点后使之立即失效，需要失效算法。
     */
    public static List<CarBase> create(){
        List<CarBase> carList = new ArrayList<>(15);
        CarBase car1 = new CarBase(0,0,2,8,1,0.5,200,0.5);
        carList.add(car1);
        CarBase car2 = new CarBase(1,50,3,6,2,0.8,400,0.78);
        carList.add(car2);
        CarBase car3 = new CarBase(2,150,2,3,1,0.6,900,0.232);
        carList.add(car3);
        CarBase car4 = new CarBase(3,200,2,8,1,0.3,500,0.2);
        carList.add(car4);
        CarBase car5 = new CarBase(4,300,3,0,0,0.4,600,0.3);
        carList.add(car5);
        CarBase car6 = new CarBase(5,300,2,6,-1,0.1,500,0.12);
        carList.add(car6);
        CarBase car7 = new CarBase(6,300,2,5,1,0.6,200,0.53);
        carList.add(car7);
        CarBase car8 = new CarBase(7,500,2,6,1,0.1,700,0.1);
        carList.add(car8);
        CarBase car9 = new CarBase(8,600,2,3,-1,0.5,400,0.3);
        carList.add(car9);
        CarBase car10 = new CarBase(9,700,2,4,2,0.4,800,0.11);
        carList.add(car10);
        CarBase car11 = new CarBase(10,900,2,6,1,0.6,600,0.43);
        carList.add(car11);
        CarBase car12 = new CarBase(11,1000,2,5,1,0.2,200,0.34);
        carList.add(car12);
        CarBase car13 = new CarBase(12,1050,2,0,0,0.4,500,0.32);
        carList.add(car13);
        CarBase car14 = new CarBase(13,1060,3,0,0,0.7,200,0.65);
        carList.add(car14);
        CarBase car15 = new CarBase(14,1200,2,6,1,0.8,200,0.84);
        carList.add(car15);
        return carList;
    }
}
